Writing latex formulas with markdown language in Hexo
Contents
How to write a lot of math formulas in your blog with markdown language?
This is a simple solution: using MathJax Library
It’s a open source javascript library, which doesn’t transform a formula into image, but using javascript to print that formula on the webpage. You can either download the js library which cost about 130M space, you can also use their CDN, so you won’t need upload the library on your web space.
For Hexo user, just append the following code in your themes/jacman/layout/_partial/after_footer.ejs file
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}
});
</script>
<script type="text/javascript"
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
Let’s have a test
$a_1$